package com.xiaotu.controller;

import com.xiaotu.service.UserAgreementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户协议-用户隐私协议
 *
 * @author zhangxiao
 * @create 2022-03-11 10:43
 */
@RequestMapping("userAgreement")
@RestController
@CrossOrigin
public class UserAgreementController {

    @Autowired
    private UserAgreementService userAgreementService;

    /**
     * 协议
     *
     * @param type 协议类型1:用户协议 2:用户隐私协议
     * @return
     */
    @GetMapping("getUserAgreement")
    public Object getUserAgreement(Integer type) {
        return userAgreementService.getUserAgreement(type);
    }

}
